<% breadcrumb :questions %>

<div class="row">
  <div class="col-lg-12">
    <div class="ibox float-e-margins">
      <div class="ibox-title">
        <h5>回答问题</h5>
      </div>
      <div class="ibox-content">
        <%= form_for [ current_event, @question ], html: {class: 'form-horizontal'} do |f|%>

          <%= text_field_tag :answer_id, @answer.id, class: 'form-control hidden' %>

          <div class="form-group"><label class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-3"><%= @question.attendee.name %></div>
          </div>

          <div class="form-group"><label class="col-sm-2 control-label">电话</label>
            <div class="col-sm-3"><%= @question.attendee.mobile %></div>
          </div>

          <div class="form-group"><label class="col-sm-2 control-label">问题</label>
            <div class="col-sm-3"><%= @question.question_content %></div>
          </div>

          <div class="form-group">
            <label class="col-sm-2 control-label">回答</label>
            <div class="col-sm-3">
              <%= text_area_tag :answer, @answer.answer, class: 'form-control' %>
            </div>
          </div>

          <div class="form-group">
            <label class="col-sm-2 control-label">通过审核</label>
            <div class="col-sm-3">
              <%= check_box_tag :state, nil, class: 'form-control' %>
            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-4 col-sm-offset-2">
              <%=link_to '取消', admins_path, class: 'btn btn-white'%>
              <%= button_tag '保存', class: 'btn btn-primary'%>
            </div>
          </div>

        <% end %>
      </div>
    </div>
  </div>
</div>